Skip to content

Conversation

@zeitlinger
Copy link
Member

No description provided.

@zeitlinger zeitlinger self-assigned this Aug 18, 2025
@zeitlinger zeitlinger requested a review from a team as a code owner August 18, 2025 10:39
@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Aug 18, 2025
@otelbot-java-instrumentation
Copy link
Contributor

🔧 The result from spotlessApply was committed to the PR branch.

1 similar comment
@otelbot-java-instrumentation
Copy link
Contributor

🔧 The result from spotlessApply was committed to the PR branch.

* This class is internal and is hence not for public use. Its APIs are unstable and can change at
* any time.
*/
@SuppressWarnings("NullAway") // setters called in static initializer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see static initializer in this class? or is it called from another class?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the static methods setInstrumenterAccess and setInstrumenterBuilderAccess

I realized that we could also add an @Initializer annotation to those methods - but we'd need a place to add this annotation.

See https://github.com/uber/NullAway/wiki/Supported-Annotations#initialization

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, maybe it wants the static fields to be annotated with @Nullable

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we'd do that - we'd get an error when the field is accessed: instrumenterAccess.startAndEnd

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added the annotation to see if that looks better

@zeitlinger
Copy link
Member Author

@trask can you check again?

@zeitlinger
Copy link
Member Author

@laurit please check again

@zeitlinger
Copy link
Member Author

@laurit please check again

@trask trask merged commit bfb2d2a into open-telemetry:main Sep 16, 2025
91 checks passed
@zeitlinger zeitlinger deleted the nullaway-inst-api branch September 16, 2025 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test native This label can be applied to PRs to trigger them to run native tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants